const path = require('path')

const fpath1 = '/a/b/c.txt'

const name = path.extname(fpath1)

console.log(name)